﻿<Window x:Class="RCMC.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Height="270" Width="340" 
    WindowStartupLocation="Manual" Topmost="True" 
    ResizeMode="NoResize" ShowInTaskbar="False" WindowStyle="ToolWindow" Title="Remote Control for Windows 7 Media Center" Loaded="Window_Loaded" Closing="Window_Closing" Closed="Window_Closed" Keyboard.PreviewKeyDown="Window_KeyDown">
	<Grid >
		<Grid.RowDefinitions>
			<RowDefinition Height="30" />
			<RowDefinition />
		</Grid.RowDefinitions>

		
			<TextBox x:Name="hostName" Height="22" HorizontalAlignment="Stretch" Margin="0,0,72,0">localhost</TextBox>
			<Button x:Name="connectButton" HorizontalAlignment="Right" Style="{StaticResource NormalGreenButton}" Width="32" Height="24" Margin="2,0,36,0" Click="connectButton_Click">
				<Path Stroke="#FFFFFF" Fill="#FFFFFF" HorizontalAlignment="Center" Stretch="Uniform" Width="16" VerticalAlignment="Center" Data="M 0,2 L 1,1 L 2,2 L 4,0 L 5,1 L 2,4 Z"></Path>
			</Button>
			<Button x:Name="disconnectButton" HorizontalAlignment="Right" Style="{StaticResource NormalRedButton}" Width="32" Height="24" Margin="2,0,2,0" Click="disconnectButton_Click">
				<Path Stroke="#FFFFFF" Fill="#FFFFFF" HorizontalAlignment="Center" Stretch="Uniform" Width="16" VerticalAlignment="Center" Data="M 0,1 L 1,0 L 2,1 L 3,0 L 4,1 L 3,2 L 4,3 L 3,4 L 2,3 L 1,4 L 0,3 L 1,2 Z"></Path>
			</Button>
		

		<Grid x:Name="gridControls" Grid.Row="1" IsEnabled="true">
			<Grid.RowDefinitions>
				<RowDefinition />
				<RowDefinition Height="20" />
				<RowDefinition Height="60" />
			</Grid.RowDefinitions>

			<StackPanel Orientation="Horizontal" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center">

				<StackPanel Grid.Column="0" Orientation="Vertical" VerticalAlignment="Center" Width="40" Margin="0,0,15,0">
					<Button Style="{StaticResource NormalButton}" Margin="2" Height="32" CommandParameter="button channelup" Click="Button_Click">
						<Path Stroke="#FFFFFF" Fill="#FFFFFF" HorizontalAlignment="Center" Stretch="Uniform" Width="16" VerticalAlignment="Center" Data="M 0,5 L 5,5 L 5,0 L 10,0 L 10,5 L 15,5 L 15,10 L 10,10 L 10,15 L 5,15 L 5,10 L 0,10 Z"></Path>
					</Button>
					<Button Style="{StaticResource NormalButton}" Margin="2" Height="32"  CommandParameter="goto tvguide" Click="Button_Click">
						<Path Stroke="#FFFFFF" Fill="#FFFFFF" HorizontalAlignment="Center" Stretch="Uniform" Width="16" VerticalAlignment="Center" Data="M 0,0 L 2,0 L 2,2 L 0,2 Z M 5,0 L 15,0 L 15,2 L 5,2 Z M 0,5 L 2,5 L 2,7 L 0,7 Z M 5,5 L 15,5 L 15,7 L 5,7 Z M 0,10 L 2,10 L 2,12 L 0,12 Z M 5,10 L 15,10 L 15,12 L 5,12 Z"></Path>
					</Button>
					<Button Style="{StaticResource NormalButton}" Margin="2" Height="32" CommandParameter="button channeldown" Click="Button_Click">
						<Path Stroke="#FFFFFF" Fill="#FFFFFF" HorizontalAlignment="Center" Stretch="Uniform" Width="16" VerticalAlignment="Center" Data="M 0,0 L 15,0 L 15,5 L 0,5 Z"></Path>
					</Button>
				</StackPanel>

				<Grid Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
					<Grid.RowDefinitions>
						<RowDefinition Height="36" />
						<RowDefinition Height="36" />
						<RowDefinition Height="36" />
					</Grid.RowDefinitions>
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="52" />
						<ColumnDefinition Width="52" />
						<ColumnDefinition Width="52" />
					</Grid.ColumnDefinitions>

					<Button Grid.Row="0" Grid.Column="0" Style="{StaticResource NormalButton}" Width="32" Height="24" CommandParameter="button back" Click="Button_Click">
						<Path Stroke="#FFFFFF" Fill="#FFFFFF" HorizontalAlignment="Center" Stretch="Uniform" Width="16" VerticalAlignment="Center" Data="M 0,8 L 10,0 L 10,6 L 20,6 L 20,10 L 10,10 L 10,16 Z"></Path>
					</Button>

					<Button Grid.Row="0" Grid.Column="2" Style="{StaticResource NormalButton}" Width="32" Height="24" CommandParameter="button info" Click="Button_Click">
						<TextBlock Foreground="#FFFFFF" FontSize="12pt" FontWeight="Bold">i</TextBlock>
					</Button>

					<Button Grid.Row="0" Grid.Column="1" Style="{StaticResource NormalButton}" Margin="2" CommandParameter="button up" Click="Button_Click">
						<Path Stroke="#FFFFFF" Fill="#FFFFFF" HorizontalAlignment="Center" Stretch="Uniform" Width="16" VerticalAlignment="Center" Data="M 0,10 L 16,10 L 8,0 Z"></Path>
					</Button>
					<Button Grid.Row="1" Grid.Column="0" Style="{StaticResource NormalButton}" Margin="2" CommandParameter="button left" Click="Button_Click">
						<Path Stroke="#FFFFFF" Fill="#FFFFFF" HorizontalAlignment="Center" Stretch="Uniform" Height="16" VerticalAlignment="Center" Data="M 10,0 L 10,16 L 0,8 Z"></Path>
					</Button>
					<Button Grid.Row="1" Grid.Column="1" Style="{StaticResource NormalButton}" Margin="2" CommandParameter="button ok" Click="Button_Click">
						<TextBlock FontWeight="Bold" Foreground="#FFFFFF" FontSize="18">OK</TextBlock>
					</Button>
					<Button Grid.Row="1" Grid.Column="2" Style="{StaticResource NormalButton}" Margin="2" CommandParameter="button right" Click="Button_Click">
						<Path Stroke="#FFFFFF" Fill="#FFFFFF" HorizontalAlignment="Center" Stretch="Uniform" Height="16" VerticalAlignment="Center" Data="M 0,0 L 0,16 L 10,8 Z"></Path>
					</Button>
					<Button Grid.Row="2" Grid.Column="1" Style="{StaticResource NormalButton}" Margin="2" CommandParameter="button down" Click="Button_Click">
						<Path Stroke="#FFFFFF" Fill="#FFFFFF" HorizontalAlignment="Center" Stretch="Uniform" Width="16" VerticalAlignment="Center" Data="M 0,0 L 16,0 L 8,10 Z"></Path>
					</Button>
				</Grid>

				<StackPanel Grid.Column="2" Orientation="Vertical" VerticalAlignment="Center" Width="40" Margin="15,0,0,0">
					<Button Style="{StaticResource NormalButton}" Margin="2" Height="32"  CommandParameter="volume up" Click="Button_Click">
						<Path Stroke="#FFFFFF" Fill="#FFFFFF" HorizontalAlignment="Center" Stretch="Uniform" Width="16" VerticalAlignment="Center" Data="M 0,5 L 5,5 L 5,0 L 10,0 L 10,5 L 15,5 L 15,10 L 10,10 L 10,15 L 5,15 L 5,10 L 0,10 Z"></Path>
					</Button>
					<Button Style="{StaticResource NormalButton}" Margin="2" Height="32" CommandParameter="volume switch" Click="Button_Click">
						<Path Stroke="#FFFFFF" Fill="#FFFFFF" HorizontalAlignment="Center" Stretch="Uniform" Height="16" VerticalAlignment="Center" Data="M 8,0 L 3,5 L 0,5 L 0,11 L 3,11 L 8,16 A 2,6 0 0 0 8,0 Z"></Path>
					</Button>
					<Button Style="{StaticResource NormalButton}" Margin="2" Height="32" Visibility="Collapsed" CommandParameter="volume switch" Click="Button_Click">
						<Path Stroke="#FFFFFF" Fill="#FFFFFF" HorizontalAlignment="Center" Stretch="Uniform" Height="16" VerticalAlignment="Center" Data="F 1 M 12,0 L 13,1 L 1,15 L 0,14 Z M 8,0 L 3,5 L 0,5 L 0,11 L 3,11 L 8,16 A 2,6 0 0 0 8,0 Z"></Path>
					</Button>
					<Button Style="{StaticResource NormalButton}" Margin="2" Height="32" CommandParameter="volume down" Click="Button_Click">
						<Path Stroke="#FFFFFF" Fill="#FFFFFF" HorizontalAlignment="Center" Stretch="Uniform" Width="16" VerticalAlignment="Center" Data="M 0,0 L 15,0 L 15,5 L 0,5 Z"></Path>
					</Button>
				</StackPanel>

			</StackPanel>

			<Canvas Grid.Row="2" HorizontalAlignment="Center" Width="308">
				<Path Visibility="Collapsed" Style="{StaticResource NormalBorder}" Stretch="Uniform" Stroke="Gray" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,0,0,0" >
					<Path.Data>
						<CombinedGeometry GeometryCombineMode="Union">
							<CombinedGeometry.Geometry1>
								<PathGeometry>
									<PathFigure StartPoint="1,4">
										<LineSegment Point="292,4" />
										<ArcSegment Size="60,40" Point="292,44" IsLargeArc="False" RotationAngle="0" SweepDirection="Clockwise" />
										<LineSegment Point="1,44" />
										<ArcSegment Size="60,40" Point="1,4" IsLargeArc="False" RotationAngle="0" SweepDirection="Clockwise" />
									</PathFigure>
								</PathGeometry>
							</CombinedGeometry.Geometry1>
							<CombinedGeometry.Geometry2>
								<EllipseGeometry RadiusX="28" RadiusY="28" Center="146.5,24" />
							</CombinedGeometry.Geometry2>
						</CombinedGeometry>
					</Path.Data>
				</Path>

				<Button Width="48" Height="32" Style="{StaticResource LeftButton}" Canvas.Top="12" Canvas.Left="2" CommandParameter="button rew" Click="Button_Click">
					<Path Stroke="#FFFFFF" Fill="#FFFFFF" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,2,4,0" Data="F 1 M 0,7 L 10,0 L 10,15 Z M 5,7 L 15,0 L 15,15 Z"></Path>
				</Button>
				<Button Width="48" Height="32" Style="{StaticResource LeftButton}" Canvas.Top="12" Canvas.Left="44"  CommandParameter="button skipback" Click="Button_Click">
					<Path Stroke="#FFFFFF" Fill="#FFFFFF" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,2,4,0" Data="M 0,0 L 3,0 L 3,15 L 0,15 Z M 13,0 L 13,15 L 3,7 Z"></Path>
				</Button>

				<Button Width="48" Height="32" Style="{StaticResource LeftButton}" Canvas.Top="12" Canvas.Left="86"  CommandParameter="button stop" Click="Button_Click">
					<Path Stroke="#FFFFFF" Fill="#FFFFFF" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,2,4,0" Data="M 0,0 L 15,0 L 15,15 L 0,15 Z "></Path>
				</Button>

				<Button Width="48" Height="48" Style="{StaticResource CenterButton}" Canvas.Top="4" Canvas.Left="130" CommandParameter="button play" Click="Button_Click">
					<Path Stroke="#FFFFFF" Fill="#FFFFFF" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="4,2,0,0" Data="M 0,0 L 0,20 L 20,10 Z"></Path>
				</Button>

				<Button Width="48" Height="32" Style="{StaticResource RightButton}" Canvas.Top="12" Canvas.Left="174" CommandParameter="button pause" Click="Button_Click">
					<Path Stroke="#FFFFFF" Fill="#FFFFFF" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="4,2,0,0" Data="M 0,0 L 3,0 L 3,15 L 0,15 Z M 10,0 L 13,0 L 13,15 L 10,15 Z"></Path>
				</Button>

				<Button Width="48" Height="32" Style="{StaticResource RightButton}" Canvas.Top="12" Canvas.Left="216" CommandParameter="button skipfwd" Click="Button_Click">
					<Path Stroke="#FFFFFF" Fill="#FFFFFF" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="4,2,0,0" Data="M 0,0 L 0,15 L 10,7 Z M 10,0 L 13,0 L 13,15 L 10,15 Z"></Path>
				</Button>

				<Button Width="48" Height="32" Style="{StaticResource RightButton}" Canvas.Top="12" Canvas.Left="258" CommandParameter="button fwd" Click="Button_Click">
					<Path Stroke="#FFFFFF" Fill="#FFFFFF" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="4,2,0,0" Data="F 1 M 0,0 L 0,15 L 10,7 Z M 5,0 L 5,15 L 15,7 Z"></Path>
				</Button>
			</Canvas>
		</Grid>
	</Grid>
</Window>
